package com.baixun.gasentity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @program: 上海燃气驾驶舱
 * @description: 用户角色关联表，用于关联用户和角色
 * @author: yesong
 **/


@Data
@TableName("sys_department_user_roles")
@ApiModel(description = "系统用户角色数据权限关联实体类")
public class SysDepartmentUserRoles implements Serializable {

    @TableId(value = "id", type = IdType.AUTO) // 主键自增
    @ApiModelProperty(value = "主键ID", example = "1", required = true)
    private Long id;

    @ApiModelProperty(value = "用户ID", example = "123456789", required = true)
    private Long userId;

    @ApiModelProperty(value = "角色ID", example = "987654321", required = true)
    private Long roleId;

    @ApiModelProperty(value = "部门ID", example = "1122334455")
    private Long deptId;

    @ApiModelProperty(value = "状态 (1: 有效, 0: 无效)", example = "1", required = true)
    private Integer status;

    @ApiModelProperty(value = "创建时间", example = "2023-01-01T12:00:00")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间", example = "2023-01-01T12:00:00")
    private LocalDateTime updateTime;

}
